package com.bstek.uflo.form.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Jacky.gao
 * @since 2013年11月5日
 */
@Entity
@Table(name="UFLO_TABLE_COLUMN")
public class TableColumn {
	@Id
	@Column(name="ID_")
	private long id;
	@Column(name="NAME_",length=60,nullable=false)
	private String name;
	@Column(name="KEY_GENERATION_TYPE_",length=10)
	@Enumerated(EnumType.STRING)
	private PrimaryKeyGenerationType keyGenerationType;
	@Column(name="EMPTY_")
	private boolean empty;
	@Column(name="MEMO_",length=120)
	private String memo;
	@Column(name="DATA_TYPE_",length=60,nullable=false)
	private String dataType;
	@Column(name="TABLE_ID_")
	private long tableId;
	@Column(name="DEFAULT_VALUE_",length=60)
	private String defaultValue;
	@Column(name="MAPPING_SOURCE_",length=20)
	@Enumerated(EnumType.STRING)
	private MappingSource mappingSource;	
	@Column(name="MAPPING_",length=300)
	private String mapping;
	@Column(name="EDITOR_TYPE_",length=20)
	private EditorType editorType;
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public long getTableId() {
		return tableId;
	}
	public void setTableId(long tableId) {
		this.tableId = tableId;
	}
	public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
	public MappingSource getMappingSource() {
		return mappingSource;
	}
	public void setMappingSource(MappingSource mappingSource) {
		this.mappingSource = mappingSource;
	}
	public String getMapping() {
		return mapping;
	}
	public void setMapping(String mapping) {
		this.mapping = mapping;
	}
	public EditorType getEditorType() {
		return editorType;
	}
	public void setEditorType(EditorType editorType) {
		this.editorType = editorType;
	}
	public boolean isEmpty() {
		return empty;
	}
	public void setEmpty(boolean empty) {
		this.empty = empty;
	}
	public PrimaryKeyGenerationType getKeyGenerationType() {
		return keyGenerationType;
	}
	public void setKeyGenerationType(PrimaryKeyGenerationType keyGenerationType) {
		this.keyGenerationType = keyGenerationType;
	}
}
